#ifndef __ADC0_H__
#define __ADC0_H__

#include "gd32f4xx.h"

#define ADC0_CLK		ADC_ADCCK_PCLK2_DIV8

/**************** ADC 0 *****************/
#define	ADC0_RESOLUTION 	ADC_RESOLUTION_12B

#define ADC0_CHNS_LEN		1
#define ADC0_CHNS			{	\
								ADC_CHANNEL_2,		\
							}

#define ADC0_CHNS_SAMPLES	{	\
								ADC_SAMPLETIME_480,	\
							}

void ADC0_init();

uint16_t ADC0_get(uint8_t index);


#endif //__ADC0_H__